Write Mask

Description

Sets a sub-unit's switch mask to the supplied bit-pattern. The number of least significant bits corresponding to the size of the sub-unit are written into the mask. A '1' bit in the mask disables the corresponding switch for the PIPLX_OpBit, PIPLX_OpCrosspoint and PIPLX_WriteSub functions.

This facility is particularly useful for matrix sub-units, where it can be used to guard against programming errors that could otherwise result in damage to matrix switches or external circuits.

Prototype

DWORD PIPLX_WriteMask(DWORD CardNum, DWORD OutSub, DWORD *Data, DWORD DataLen);

Parameters:

Session - the SESSION variable for the connected LXI device

CardNum - card number

OutSub - output sub-unit number

Data - pointer to the one-dimensional array (vector) containing the mask pattern to be set

DataLen - length of the above array in BYTES (Note - BYTES not DWORDs !)

 

Returns:

Zero for success, or non-zero error code.

Note

For a Matrix sub-unit, the mask data is folded into the vector on its row-axis: see Data Formats.

Warning

The data array pointed to must contain sufficient bits to represent the mask pattern for the specified sub-unit, or undefined data will be written to the more significant bits.

Example Code

See the description of PIPLX_WriteSub for example code using an array-based function.